﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace lin_cms_dotnet_core.Models
{
    [Table("lin_file")]
    [Index(nameof(Md5), nameof(DeleteTime), Name = "md5_del", IsUnique = true)]
    public partial class LinFile
    {
        [Key]
        [Column("id", TypeName = "int(10) unsigned")]
        public uint Id { get; set; }
        [Required]
        [Column("path")]
        [StringLength(500)]
        public string Path { get; set; }
        [Required]
        [Column("type")]
        [StringLength(10)]
        public string Type { get; set; }
        [Required]
        [Column("name")]
        [StringLength(100)]
        public string Name { get; set; }
        [Column("extension")]
        [StringLength(50)]
        public string Extension { get; set; }
        [Column("size", TypeName = "int(11)")]
        public int? Size { get; set; }
        [Column("md5")]
        [StringLength(40)]
        public string Md5 { get; set; }
        [Column("create_time", TypeName = "datetime(3)")]
        public DateTime CreateTime { get; set; }
        [Column("update_time", TypeName = "datetime(3)")]
        public DateTime UpdateTime { get; set; }
        [Column("delete_time", TypeName = "datetime(3)")]
        public DateTime? DeleteTime { get; set; }
    }
}
